<?php

namespace Biz\Mailers;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Biz\Contracts\Mailer\TagsContract;
use Illuminate\Queue\SerializesModels;

/**
 * Mailer.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class Mailer extends Mailable
{
    use Queueable, SerializesModels;

    /**
     * The "bcc" recipients of the message.
     *
     * @var array
     */
    public $bcc = [
        [
            'name'    => 'JMJones',
            'address' => 'jmjones@163.com',
        ],
    ];

    /**
     * @var array
     */
    protected $tags = [];

    /**
     * Push Tags.
     *
     * @param TagsContract $tags
     *
     * @return $this
     */
    public function pushTags(TagsContract $tags)
    {
        $this->tags = array_merge($tags->getTags(), $this->tags);

        return $this;
    }

    /**
     * Get All Tags.
     *
     * @return array
     */
    public function getTags(): array
    {
        return $this->tags;
    }

//    /**
//     * Create a new message instance.
//     *
//     * @return void
//     */
//    public function __construct()
//    {
//        //
//    }
//
//    /**
//     * Build the message.
//     *
//     * @return $this
//     */
//    public function build()
//    {
//        return $this->view('emails.default.register');
//    }
}
